#ifndef CUSTOMPROGRESSBAR_H
#define CUSTOMPROGRESSBAR_H

#include <QProgressBar>
#include <QDebug>

class CustomProgressBar : public QProgressBar
{
    Q_OBJECT
public:
    CustomProgressBar();

    CustomProgressBar(int min, int max, int cur);

//    static CustomProgressBar *m_customProgress;

public:
    // 单例模式,不适合用
//    static CustomProgressBar * instance();
//    static CustomProgressBar * instance(int min, int max, int cur);

    // 非单例模式，突然发现每个标签页需要一个进度条，但是又不想全都改了。索性就这样写
//    static CustomProgressBar * newInstance();
//    static CustomProgressBar *newInstance(int min, int max, int cur);

public slots:
    void handleStartProgress();
    void handleLoadProgress(int val);
    void handleEndProgress(bool success);
};

#endif // CUSTOMPROGRESSBAR_H
